home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / crack / Howto9a.txt < prev    next >
Encoding:
Text File  |  1999-01-12  |  29.4 KB  |  609 lines

  1. HOW TO CRACK, by +ORC, A TUTORIAL
  2. Lesson 9 (1): How to crack Windows, Hands on
  3. [Winformant][Snap32]
  4.  
  5.  
  6.   THE [DATA_CONSTRAINT] TRICK - [WINFORMANT 4]
  7.      I have chosen an older windows application for Win 3.1.
  8. (WIN4MANT.EXE, 562271 bytes, Version 1.10, by Joseph B. Albanese;
  9. you'll find it searching the web with the usual tools, see how
  10. to do it at the end of this lesson), in order to show you how to
  11. use a nice little trick, at times really useful in cracking
  12. password protected programs: [data_constraint]. Inside almost all
  13. protection routines, as you have already learned, there is a
  14. moment when on the stack the ECHO of the real, "correct"
  15. passnumber or password appears. The location of this ECHO varies,
  16. but most of the time it'll be in a range of +- 0x90 bytes from
  17. one of the locations where the user input dwells. This is due to
  18. datadump windows constraints inside the tools used by the
  19. protectionists... but this use is bound to diminish... especially
  20. after this lesson :=)
  21.  
  22. [WINFORMANT CRACKING]
  23.  This application is -per se- crappy, I doubt you'll ever use
  24. it... but its curious (and pretty rare) "deactivate" mode is
  25. nevertheless very interesting for us: you can "unregister"
  26. Winformant on the fly if you feel the need to.
  27.  This feature is pretty useful for scholars that like to
  28. investigate password algorithms with valid and invalid codes
  29. without having to reinstall every time to delete a valid code.
  30. For your cracking exercises choose programs that have
  31. "REVERSIBLE" protections (rare) or that can be re-registered a
  32. billion times (more frequent). Programs that keep the valid
  33. registration on *.ini or special files will also do the job: you
  34. just change a couple of lines to "unregister" them.
  35.  The trick of this lesson: [data_constraint], or "password
  36. proximity", bases on the protectionist's need to keep an eye on
  37. the protection "working" when he assembles it. He must "see" the
  38. relationships between USER INPUT NUMBER, USER INPUT TRANSFORMED
  39. and the CORRECT NUMBER ANSWER (in our jargon: the "Bingo"). These
  40. relationships must be constantly checked In order to debug the
  41. protection code. Mostly they will dwell TOGETHER inside a small
  42. stack area, allowing them to be "seen" in the SAME watchwindow.
  43. Most of the time, therefore, the "ECHO" will "materialize"
  44.  
  45. shortly not very far away from one of the locations of the USER
  46. INPUT. Let's crack:
  47.  
  48. * Fire Winice and then Winformant
  49. * Choose HELP and then choose REGISTRATION
  50. * Fill the registration fields with "+ORC+ORC" as "Registrant"
  51. and "12121212" as "Activation" code (use whatever you fancy).
  52. CTRL+D              ;switch to Winice
  53. :task               ;let's see what's the name of this crap
  54. TaskName  SS:SP StackTop StackBot StackLow TaskDB  hQueue  Events
  55. WINWORD   1AD7:85F2 4A52  8670      7532     1247    122F    0000
  56. PROGMAN   1737:200A 0936  2070      1392     066F    07F7    0000
  57. DISKOMAT *2C5F:6634 1D3C  6AC6      5192     2CB7    2C9F    0000
  58.  
  59. :hwnd DISKOMAT      ;which window is getting the input?
  60. WinHandle   Hqueue  QOwner    Class Name        Window Procedure
  61. 0EB4(0)      2C9F    DISKOMAT  #32769            04A7:9E6B
  62.  0F34(1)     2C9F    DISKOMAT  #32768            USER!BEAR306
  63.  365C(1)     2C9F    DISKOMAT  #32770            2C3F:0BC6
  64.   36BC(2)    2C9F    DISKOMAT  Button            2C3F:1CEA
  65.   3710(2)    2C9F    DISKOMAT  Edit              2C3F:24BE
  66. ... and many more irrelevant windows.
  67.  
  68. Let's pinpoint the code, here the relevant window is the first
  69. "Edit" one, for obvious reasons (more on this later).
  70. :bmsg 3710 wm_gettext           ;set breakpoint
  71. CTRL+D                          ;run the babe until you get:
  72. Break Due to BMSG 3710 WM_GETTEXT C=01
  73.   Hwnd=3710 wParam=0050 lParam=2C5F629A msg=000D WM_GETTEXT
  74. 2C3F:000024BE B82F2C            MOV     AX,2C2F
  75. So! Now we have "pinpointed" the babe (more on "pinpointing"
  76. later). Let's snoop around a little: look at the stack to fetch
  77. your babe's last call (if it does not show immediately, just keep
  78. pinpointing, for instance on GetWindowText() or do a BPRW
  79. diskomat (very useful), and then try and retry the stack...
  80. should this too fail to work, search for your input in memory (in
  81. the 30:0 lffffffff selector, as usual) and breakpoint range on
  82. it with ReadWrite, and then stack, stack, stack... until you get
  83. the "real" list of calls coming from your babe's protection.
  84. :stack              ; let's see
  85. USER(19) at 073F:124C [?] through 073F:1239
  86. CTL3D(02) at 2C3F:0D53 [?] through 2C3F:0D53
  87. DISKOMAT(01) at 2C97:20B9 [?] through 2C97:20B9
  88. DISKOMAT(01) at 2C97:3D94 [?] through 2C97:3D94
  89. DISKOMAT(01) at 2C97:49E2 [?] through 2C97:4918
  90. DISKOMAT(04) at 2C7F:EA20 [?] through 2C7F:EA20
  91. USER(01) at 04A7:19BE [?] through USER!GETWINDOWTEXT
  92. == CTL3D(02) at 2C3F:24BE [?] through 04A7:3A3Cµ
  93.  
  94.  Beautiful stack fishing! Do immediately a BPX on babe:EA20.
  95. 2C7F:EA35 9A25ABA704   CALL   USER!GETWINDOWTEXT
  96. 2C7F:EA3A 8D46AE       LEA    AX,[BP-52]     ;load ptr "+ORC+ORC"
  97. 2C7F:EA3D 16           PUSH   SS   ;save pointer segment
  98. 2C7F:EA3E 50           PUSH   AX   ;save pointer offset
  99. 2C7F:EA3F 9A768D872C   CALL   2C87:8D76; get strlen "ORC+ORC"
  100. 2C7F:EA44 83C404       ADD    SP,+04
  101. 2C7F:EA47 3D2800       CMP    AX,0028
  102. 2C7F:EA4A 762C         JBE    EA78
  103. ...
  104. 2C7F:EA97 8D46AE       LEA    AX,[BP-52]     ;load ptr "+ORC+ORC"
  105. 2C7F:EA9A 16           PUSH   SS     ;various algors on input
  106. 2C7F:EA9B 50           PUSH   AX     ;follow here, we do not
  107. ...                                  ;need to care
  108. 2C7F:EAB2 0F851101     JNE    EBC7
  109. 2C7F:EAB6 8D8E5CFF     LEA    CX,[BP+FF5C]  ;ptr "12121212"
  110. 2C7F:EABA 16           PUSH   SS
  111. 2C7F:EABB 51           PUSH   CX
  112. 2C7F:EABC 9A768D872C   CALL   2C87:8D76 ;get strlen "12121212"
  113. 2C7F:EAC1 83C404       ADD    SP,+04
  114. 2C7F:EAC4 50           PUSH   AX
  115. 2C7F:EAC5 8D865CFF     LEA    AX,[BP+FF5C] ;ptr "12121212" HERE!
  116. 2C7F:EAC9 16           PUSH   SS
  117. 2C7F:EACA 50           PUSH   AX
  118. ...etc, various algors on input follow here
  119.  
  120.   OK, it's enough: now obviously follows the code that
  121. "algorithmize" the number string, and then, somewhere, you'll
  122. have the hideous compare that divides good guys and bad crackers.
  123. You could examine, and crack, and search...
  124.   BUT NOW IT'S THE "MAGIC MOMENT" OF THE ECHO! We know and *feel*
  125. it: The echo must be somewhere... how do we find it? Searching
  126. "12121212" in memory fishes at least 10 different locations...
  127. :s 30:0 lffffffff '12121212'
  128. Pattern Found at 0030:0005AD6A
  129. .... (7 more)
  130. Pattern Found at 0030:80509D6A
  131. Pattern Found at 0030:8145AD6A
  132.  Should we look for all occurrences of string '12121212',
  133. starting with the two at 80000000, dumping +-0x90 around it...
  134. until we find the echo? We could, and it would work, but that's
  135. not zen... that's boring! In other protections these locations
  136. could proliferate on purpose, to deter the casual cracker. There
  137. must be some other way... And lo and behold! YES! There is a
  138. quicker way... THE LAST loading of the numeric input string in
  139. the code (the one after the strlen count) is the "right" one for
  140. our cracking purposes, coz protections follow (mostly) this
  141. pattern (remember: we are inside a "stack-heavy" section of the
  142. code... if you want to crack higher I suggest you read some good
  143. literature about stack working, stack tricks and stack magics
  144. with the Intel processors):
  145.      LOAD NAMEString - COUNT NAMEStringLen
  146.  
  147.      LOAD NAMEString - TRANSFORM NAMEString
  148.      LOAD CODEString - COUNT CODEStringLen
  149.      LOAD CODEString
  150.                *ECHO must be here*
  151.      TRANSFORM CODEString
  152.                *ECHO must be here*
  153.      COMPARE TRANSFORMED_NAMEString WITH TRANSFORMED_CODEString
  154.  
  155.   This means that at line
  156. 2C7F:EAC5 8D865CFF   LEA  AX,[BP+FF5C]  ;ptr "12121212"
  157. you'll already have your echo somewhere... just dump the memory
  158. around the pointer [BP+FF5C]:
  159. :d 2c5f:61e8   ;these numbers will differ in your computer
  160. 02 62 2F 06 02 00 26 2E-A3 4E A3 4E 01 00 38 30  .b/...&..N.N..80
  161. 33 37 2D 36 34 36 2D 33-38 33 36 00 01 06 02 00  37-646-3836.....
  162. 2F 06 75 62 C3 2E B7 04-F2 24 2F 06 CE 6E 2F 06  /.ub.....$/..n/.
  163. 49 00 5A 00 01 00-04 2C 2F 06 AE 24 36 62 00 00  I.Z......,/..$6b
  164. 74 62 7A 2E B7 04 36 62-01 00 C2 62 2F 2C 26 2E  tbz...6b...b/,&.
  165. 03 01 BA 0F AE 24 5F 02-C9 01 5E 02 BA 01 5F 02  .....$_...^..._.
  166. 31 32 31 32 31 32 31 32-00 0C 00 BC 02 00 00 00  12121212........
  167. 00 49 00 BA 0F-AE 24 F2 24 2F 06 00 00 00 00 00  ....I....$.$/...
  168. AF 17 00 E2 5F-7A 62 FE FF 79 1B BA 0F 00 00 00  ......._zb..y...
  169. 96 0B 01 00 02 4E 00-37 01 8A 62 D2 0F 8F 17 00  .....N..7..b....
  170. 2F 06 00 37 01-98 62 20 10 16 03 2F 06 00 00 00  /.....7..b .../.
  171. C2 62 2B 4F 52 43 2B 4F-52 43 00 0D AE 24 2F 06  .b+ORC+ORC......
  172.  
  173.  Look at this dump: everybody is there! The stack pointers points
  174. in the middle, at string "12121212". 0x50 bytes before it you'll
  175. find our good old ECHO (i.e. the CORRECT passnumber) and 0x50
  176.  
  177. bytes afterwards you'll see your handle: here "+ORC+ORC".
  178.      It's cracked! The code for my "+ORC+ORC" is 8037-646-3836...
  179. Now begin your assignments: if you rally want to learn cracking:
  180. -    "Unregister" and find anew your own code for your own
  181.      handle. *DO NOT* use serial numbers with any other name
  182.      that your own handle, that's miserable stealing, not
  183.      cracking. I'll begin to punish the serial#_aficionados on
  184.      the Web, coz I like real outlaws, but I detest stupid
  185.      pickpockets.
  186. -    Study the two coding algorithms, the one for the input name
  187.      and the one for the input number, this will be very useful
  188.      for your future cracking sessions.
  189. -    Find the "Compare", i.e. the code that sets the two usual
  190.      flags "good guy, you may move on" and "bad cracker, beggar
  191.      off", and
  192. -    Create a "real" crack for this protection, that will allow
  193.      anybody you think deserves it, with any name and any
  194.      password number, to get through.
  195.  
  196. [CRACKING SNAP 32]
  197.      Snap 32  (SNAP32.EXE 356.352 bytes, 24/11/95,  Version 2.54,
  198. by Greg Kochaniak) is a "snapshot" shareware program for Windows
  199. 95, that allows users to save the screen, parts of it, or a
  200. single window. It's a very common 'try before you buy' program,
  201. limited to 30 days use. You'll find it everywhere on the Web. If
  202. you do not know how to search the Web (poor guy!), learn at the
  203. end of this lesson the correct procedure to find all the files
  204. you need on the Net and get them automatically emailed to you
  205. (that's something you should learn: SEARCHING! It's even more
  206. important than cracking!).
  207.      Snap32 is not very interesting (I don't think I used it more
  208. than a couple of times), but its protection is: in order to (try
  209.  
  210. to) deter casual crackers it does not compare strings, it
  211. compares a "magic" sum (from Namestring) with another magic sum
  212. (from Numberstring). And:
  213. *    SUMS magics inside the GDI, not inside its own code;
  214. *    USES a look_up table for input validation instead of
  215.      "plain" code;
  216. *    COMPARES the "magic" manipulation from input NUMBER with
  217.      the "magic" manipulation from input NAME.
  218.  
  219.  
  220.   The cracking procedure for most of these windows programs is
  221. pretty simple and relatively straightforward:
  222.  
  223. 1)   SEE THE NAME OF YOUR BABE AND ITS QUEUE SELECTOR
  224. :task     ;This is the Winice95 command you type after firing
  225. snap32 and getting at the "Enter License" nag window:
  226.  
  227. TaskName SS:SP     StckTp   StckBt  StckLw TaskDB  Hqueue  Events
  228. Snap32   0000:0000 006 AC000 006B0000       270E    D27    0000
  229.  
  230. OK, the babe is Snap32,it's HQUEUE is 0xD27, it's TaskDB is
  231. 0x27OE, orright.
  232.  
  233. 2)   SEE THE MODULES OF YOUR BABE:
  234. :map32 snap32       ;Your command
  235. Owner     Obj Name  Obj#  Address        Size      Type
  236. SNAP32    .text     0001  0137:00401000  00043000  CODE  RO
  237. SNAP32    .rdata    0002  013F:00444000  00002E00  IDATA RO
  238. SNAP32    .data     0003  013F:00447000  00009000  IDATA RW
  239. SNAP32    .idata    0004  013F:00471000  00001C00  IDATA RW
  240. SNAP32    .rsrc     0005  013F:00473000  00001600  IDATA RO
  241. SNAP32    .reloc    0006  013F:00475000  00004C00  IDATA RO
  242.  
  243. OK, so the code is in selector 137:(as usual), and you have there
  244. 43000 bytes of code from 401000 to 401000+43000; the DATA,
  245. ReadWrite and ReadOnly, are in selector 13F: (as usual).
  246.  
  247. 3) SEE THE HANDLE OF THE PROTECTION "NAG" WINDOW
  248. :hwnd snap32             ;Your command
  249. Window Handle  Hqueue  SZ  Qowner   Class Name Window Procedure
  250.  0350(1)       0D27    32  SNAP32   #02071     144F:0560
  251.   0354(2)      0D27    32  SNAP32   #02071     17CF:102E
  252.   ... and many more windows that we do not care of.
  253.  
  254.   OK, so, for our cracking purposes, it's Handle 0x350. Most of
  255. the times the "nag" window you want to crack will be the first
  256. one in the hwnd listing (coz it was the last one to appear).
  257. Watch the number in parentheses that follows the Whandle: (1) is
  258. a mother, (2) are "children" windows. At times you'll find under
  259. "Class Name" something like "Edit" (see before the Winformant
  260. cracking)... SNIFF THERE! At times the "Window Procedure" code
  261. location in a list of more than twenty, will be slightly
  262. different for one or two windows... SNIFF THERE!
  263.  
  264. 4) BREAKPOINT MESSAGE WM_GETTEXT (or any other WM_ that you can
  265. think of in order to "pinpoint" the code of our babe).
  266. "Pinpointing" the code is extremely important in windows
  267. cracking... this idiotic OS moves code, data and stack out and
  268. inside the pages all the time... so you'll keep getting on
  269. "INVALID" sections without a correct pinpointing. Good
  270. Pinpointing points are in general:
  271.   BMSG xxxx WM_GETTEXT   (good for passwords)
  272.   BMSG xxxx WM_COMMAND   (good fro OK buttons)
  273.   BPRW *your babe* TW    (good for tracking)
  274.   u USER!GETWINDOWTEXT   (u and then BPX inside the code)
  275.   u GETDLGITEM           (for the Hwnd of an Item inside a
  276.                          Dialog Box)
  277.   CSIP NOT GDI           (if you have too many interferences)
  278.   u USER!SHOWWINDOW      (bpx with counter occurrence to get to
  279.                          the "right" window)
  280.   u GETSYSTEMTIME        (for "time-crippled" software)
  281. and many others pinpointing points you'll learn. If you are
  282. really desperate for pinpointing, just do a BMSG xxxx WM_MOVE and
  283. then move the nag window, this will always work. Let's go on:
  284.  
  285. :bmsg 350 wm_gettext     ;Your command
  286. OK, so the code is ready to be pinpointed.
  287.  
  288. 5)RUN THE PROGRAM TO THE BREAKPOINT:
  289. CTRL+D                   ;Your command to exit Winice and run
  290.                          until it pops out at breakpoint
  291. OK, now you pop out inside Winice somewhere... (look at the stack
  292. to know where) so the code has been pinpointed.
  293.  
  294. 6) SEARCH THE DATA AREA for your input string (4 Gigabytes from
  295. 30:0... remember that DATA are *always* in 30:0 to 30:FFFFFFFF
  296. and CODE is *always* in 28:0 to 28:FFFFFFFF). In most protection
  297. the "registration_number" string must match the "username"
  298. string, which cannot be constrained, in order to allow users to
  299. choose whatever stupid name they fancy. Some protections requires
  300. fixed symbols inside the "username" string, though... in these
  301. rare eventualities, just apply to the "username" string what
  302. we'll do here with the "registration_number" string. The point
  303. to remember is: begin always with the protection fumbling your
  304. number, crack only if necessary the protection that fumbles your
  305. name. Let's search now.
  306.  
  307. :s 30:0 lffffffff '12121212'  ;Your command
  308.      Pattern Found at 0030:80308612
  309.  
  310. 80000000 is good. Lower era videos, mirrors and BIOS, higher
  311. (around C0000000) you have the OS dustbins... the point to
  312. remember is: investigate always FIRST the 80000000 locations.
  313.  
  314. 7)   BREAKPOINT ON MEMORY RANGE ON THIS STRING.
  315. By the way: prepare a watch window  dex 3 es:di, you'll soon see
  316. how useful such an automated watchwindow is in password cracking.
  317.  
  318. :bpr 30:80308612 30:80308612+8 RW  ;Your command
  319.  
  320. OK Now we'll begin to dig out the relevant parts of the code.
  321. Remember that you must breakpoint *every* copy of the string that
  322. protection generates. A typical copy routine, very frequently
  323. used in windows copy protection schemes, dwells inside
  324. KERNEL!HMEMCPY (+0076):
  325.  
  326. 0117:9E8E 66C1E902      SHR     ECX,02
  327. 0117:9E92 F36766A5      REPZ MOVSD      ;makes a copy in es:di
  328. 0117:9E96 6659          POP     ECX
  329. 0117:9E98 6683E103      AND     ECX,+03
  330. 0117:9E9C F367A4        REPZ MOVSB
  331. 0117:9E9F 33D2          XOR     DX,DX
  332.  
  333. In fact, this piece of copying code is so often used for password
  334. verifications that sometimes you just need to bpx on 0117:9E92
  335. to get the correct stack sequence... but let's, for now, continue
  336. without such little tricks: just keep on BPRring (Breakpoint on
  337. memory range) all copies that protection makes.
  338.  
  339. 8) LET THE BABE RUN, it will breakpoint on all manipulations of
  340. your input string. One of them will lead to the magic.
  341. 8.1.)     VALIDATION phase
  342. There are many routines that check and "validate" your inputs.
  343. The most common ones check that your numbers ARE really numbers,
  344. i.e. in the range 0x30-0x39. Usually this is done with:
  345.           CMP  EAX,+30
  346.           JB   no_number
  347.           CMP  EAX,+39
  348.           JA   no_number
  349. At times the protectionists use TABLES instead... The number
  350. itself is used as a pointer to a "ready made" table where the
  351. relevant magic can be used as a protection. Imagine that a number
  352. 4  in your input points to a code section that throws you
  353. immediately outside the validation routine... or imagine that a
  354. number 7, if found in your input, fetches a magic code that
  355. removes the whole program from your harddisk (or worse): "Ah, ah!
  356. Stupid cracker will never know that he should not have used
  357. number 4... and definitely not number 7! Next time he'll
  358. learn..." Yes, tables have been used for such nasty tricks.
  359. Here the relevant code for the "validation" part of our
  360. protection (still checking my favourite input string '12121212'):
  361. :check_if_valid
  362. 0137:4364AE 8A16       MOV     DL,[ESI] ;load license number
  363. 0137:4364B0 33C0       XOR     EAX,EAX  ;zero AX
  364. 0137:4364B2 668B0451   MOV     AX,[ECX+2*EDX] ;look table for 84
  365. 0137:4364B6 83E008     AND     EAX,+08  ;OK if AND'S TO zero
  366. 0137:4364B9 85C0       TEST    EAX,EAX  ;and therefore
  367. 0137:4364BB 7403       JZ      004364C0 ;go on
  368. 0137:4364BD 46         INC     ESI      ; ready for next number
  369. 0137:4364BE EBCD       JMP     0043648D
  370. :strip_-_&_+_signs
  371. 0137:4364C0 33DB       XOR     EBX,EBX  ;clean BX
  372. 0137:4364C2 8A1E       MOV     BL,[ESI] ;load license number
  373. 0137:4364C4 46         INC     ESI      ;ready for next
  374. 0137:4364C5 8BFB       MOV     EDI,EBX  ;save copy
  375. 0137:4364C7 83FB2D     CMP     EBX,+2D  ;is it a "-"?
  376. 0137:4364CA 7405       JZ      004364D1
  377. 0137:4364CC 83FB2B     CMP     EBX,+2B  ;is it a "+"?
  378.  
  379. 8.2.)     MANIPULATION (summing magic numbers)
  380. Your wisely set breakpoints on memory range for the occurrence
  381. of the string "12121212" will pop you out, inter alia, inside
  382. following piece of code (note how this part of protection dwells
  383. inside GDI, and  NOT inside the code selector of snap32):
  384. 0557:11BD 33C0         XOR  EAX,EAX        ;zero AX
  385. 0557:11BF 66648B06     MOV  AX,FS:[ESI]    ;load number
  386. 0557:11C3 83C602       ADD  ESI,+02        ;point to next
  387.  
  388. 0557:11C6 66833C4700   CMP  WORD PTR [EDI+2*EAX],+00
  389. 0557:11CB 0F8424010000 JE   000012F5
  390. 0557:11D1 668B0442     MOV  AX,[EDX+2*EAX] ;load from magic table
  391. 0557:11D5 03D8         ADD  EBX,EAX        ;save sum in EBX
  392. 0557:11D7 49           DEC  ECX            ;till we are done
  393. 0557:11D8 75E5         JNZ  000011BF       ;loop along
  394.  
  395. Interesting, isn't it? Protection is using this GDI routine to
  396. create a SUM (through pointers to another table) that depends on
  397. your very input numbers. We are now very near to the crack... can
  398. you *feel* it? If not, prepare yourself a good Martini Vodka!
  399. This is the correct way to do it:
  400.  * Get a "highball" glass;
  401.  * Put some ice cubes inside it (2 or 3);
  402.  * Add Martini Dry (From Martini & Rossi). Fill to 1/3;
  403.  * Add Moskowskaja Wodka (the only real Vodka). Fill to 2/3;
  404.  * Add a zest of lemon (From Malta or Southern France);
  405.  * Add a green "sound" olive (from Italy or Israel);
  406.  * Add Schweppes Indian Tonic. Fill to the brim.
  407. Sit deeper and relax, sip slowly and *feel* where the code of the
  408. protection scheme you are cracking "moves"... It's like a
  409. current... a slow tide. If you still do not believe me, just try
  410. it.
  411.  
  412. We'll now find out where protection stores the "magic" sum (and
  413. now you'll pop out inside the very own snap32 code, this is the
  414. "real" protection part):
  415.  
  416. 8.3.)     The ludicrous "HIDING" of the magic sum
  417. 0137:40437E 83C404       ADD     ESP,+04
  418. 0137:404381 8B4DE8       MOV     ECX,[EBP-18]
  419. 0137:404384 8945F0       MOV     [EBP-10],EAX  ;***HERE!***
  420. 0137:404387 68FF000000   PUSH    000000FF
  421. 0137:40438C 8D8574FBFFFF LEA     EAX,[EBP+FFFFFB74] ;load string
  422. 0137:404392 50    PUSH   EAX                      ;push it
  423. 0137:404393 E886410100   CALL    0041851E         ;manipulate
  424. 0137:404398 8D8574FBFFFF LEA     EAX,[EBP+FFFFFB74] ;load string
  425. 0137:40439E 50    PUSH   EAX                      ;push it
  426. 0137:40439F E88C210300   CALL    00436530         ;manipulate
  427.  
  428. As you can see, the protection is very simple: The "magic" sum
  429. is hidden only two lines before the further manipulations of the
  430. input string. We have found location 137:404384, here, in the
  431. CORRECT way, through bprring of the string that has been
  432. manipulated in the GDI, but actually, we could have found it
  433. quickly just checking superficially what's happening "around" all
  434. manipulations of the input string. Do we really need to follow
  435. all manipulations of our registration_number and eventually also
  436. all manipulation of our username? NO, not at all: we just set a
  437. BPR on the stack location where protection hides the sum [EBP-10]
  438. and we'll see what happens: 90% of these protections just create
  439. two sums, a sum from your username and a sum from your
  440. registration_number... somewhere there will be a compare that
  441. must use this location (or a copy of it... we'll see).
  442.  
  443. 8.4.) COMPARING THE MAGICS FROM THE TWO INPUT STRING
  444. Breakpoint on memory range on the sum location [EBP-10] that you
  445. saw in the previous code and you'll land at this piece of code:
  446. 0137:404412 E82F050000   CALL 00404946
  447. 0137:404417 83C40C       ADD  ESP,+0C
  448. 0137:40441A 3B45F0       CMP  EAX,[EBP-10] ;comp AX & magicsum
  449. 0137:40441D 740F         JZ   0040442E
  450. 0137:40441F 68C0874400   PUSH 004487C0
  451. 0137:404424 E8149E0000   CALL 0040E23D
  452. 0137:404429 83C404       ADD  ESP,+04
  453. 0137:40442C EB5B         JMP  00404489
  454. 0137:40442E 893DA0714400 MOV  [004471A0],EDI
  455. 0137:404434 85FF         TEST EDI,EDI
  456.  
  457. That's it, you have made it! We found the compare between the
  458. "username" magic number (for my "+ORC+ORC" string that's here
  459. 0x7C25621B) in AX (we do not need to know how this landed
  460. there... it's irrelevant!) and the "license_number" '12121212'
  461. (whose magic is here 0x00B8F47C) stored in [pointer-10.] How do
  462. we find now the correct INPUT number for +ORC+ORC? Well, it's
  463. easy...  the "magic number" must be the same... therefore:
  464.  
  465. Cracked=Dec(0x7C25621B)
  466. Cracked=2082824731
  467.  
  468.      That was it. Old Snap32 has been cracked. You could now
  469. prepare a crack in order to distribute this program around
  470. without its simple protection. Good cracked applications should
  471. be given free (i.e. cracked) to all the people that NEED them and
  472. do not have the money to buy them. Don't forget that in this
  473. intolerable society the 0,5% of the citizens own the 56% of the
  474. industrial capital and the 63% of the propaganda machines (data
  475.  
  476. from US researchers... therefore suspect... the real situation
  477. is probably even worser) effectively conditioning the destiny of
  478. millions of slaves, moronized by television watching. So crack
  479. the applications and give them to the people you care and the
  480. peolple that need them, but for the others... just EXPLAIN
  481. everybody how you did it... this is real help: giving knowledge,
  482. not wares. DO NOT use my handle and my codes to crack this
  483. program, get yours, I gave you mine only as an help for this
  484. cracking lesson. I have showed you the way enough... THIEFS, not
  485. crackers, use the codes that others have found. You are (gonna
  486. be) CRACKERS! Remember it, look straight ahead, crack accurately
  487. and keep your tommy in.
  488.  
  489. HOW TO SEARCH THE INTERNET FOR FILES WITHOUT MOVING A FINGER
  490.   It's amazing: most of the people roaming around inside Internet
  491. DO NOT know how to use effectively the web. I'll be very
  492. altruistic and explain how to fetch the very example of Snap32,
  493. the babe we cracked in this lesson.
  494.  
  495. 1) Choose an archie from this list (I will not explain you what
  496. an archie is, you should know it... if you do not, be ashamed):
  497.      archie.univie.ac.at      131.130.1.23        Austria
  498.      archie.belnet.be         193.190.248.18      Belgium
  499.      archie.funet.fi          128.214.6.102       Finland
  500.      archie.univ-rennes1.fr   129.20.254.2        France
  501.      archie.th-darmstadt.de   130.83.22.1         Germany
  502.      archie.ac.il             132.65.16.8         Israel
  503.      archie.unipi.it          131.114.21.10       Italy
  504.      archie.uninett.no        128.39.2.20         Norway
  505.  
  506. 2) Email a message to your archie:
  507.      To:       archie.univie.ac.at (for instance)
  508.      Subject:                      (nothing on this field)
  509.      Body:     set search sub      (substrings too)
  510.                set maxhits 140     (max 140 hits)
  511.                set maxhitspm 9     (not the same file all over)
  512.                find snap32         (we want this)
  513.  
  514. 3) After a while you'll get (per email) your answer: Here the
  515. answer from the Austrian archie
  516.  
  517. Host ftp.wu-wien.ac.at    (137.208.8.6)
  518.  Last updated 17:48  9 Aug 1995
  519.  Location: /pub/systems/windows.32/misc
  520.   FILE    -rw-r-----  128957 bytes  15:59 16 Jun 1995  snap32.zip
  521. Host space.mit.edu    (18.75.0.10)
  522.  Last updated 00:45  4 Mar 1996
  523.  Location: /pub/mydir
  524.   FILE    -rw-r--r--  407040 bytes  11:55 28 Nov 1995  snap32.exe
  525.  
  526. 4) ftpmail your file (Browsing is no good: too busy and lame).
  527. Again, I will not explain you what an FTPMAIL server is: learn
  528. it by yourself... choose a good one from this list (there are
  529. many more... you'll learn):
  530.    bitftp@vm.gmd.de                           (Germany)
  531.    ftpmail@ieunet.ie                          (Ireland)
  532.    bitftp@plearn.edu.pl                       (Poland)
  533.    ftpmail@ftp.sun.ac.za                      (South Africa)
  534.  
  535.    ftpmail@ftp.sunet.se                       (Sweden)
  536.    ftpmail@ftp.luth.se                        (Sweden)
  537.    ftpmail@src.doc.ic.ac.uk                   (United Kingdom)
  538.  
  539. To:       ftpmail@ftp.sun.ac.za.   (for instance)
  540. Subject:                           (leave blank)
  541. Body:     open space.mit.edu       (the last occurrence that
  542.                                    the archie sent)
  543.           cd/pub/mydir             (get the correct subdir)
  544.           bin                      (prepare for BINARY)
  545.           get snap32.exe           (I want this)
  546.           quit                     (bye)
  547.  
  548. 5) Your FTPMAIL server will first notice you a receipt:
  549.  
  550. FTP EMAIL response...
  551. ftpmail has received the following job from you:
  552.       reply-to +ORC
  553.       open space.mit.edu +ORC@now.here
  554.       get snap32.exe
  555. ftpmail has queued your job as: 1834131821.5514
  556. Your priority is 1 (0 = highest, 9 = lowest)
  557. Requests to sunsite.doc.ic.ac.uk will be done before other jobs.
  558. There are 14 jobs ahead of this one in the queue.
  559. 4 ftpmail handlers available.
  560. To remove send a message to ftpmail containing just:
  561. delete 1834131821.5514
  562.  
  563. After a while you'll get a second message, with your file
  564. uuencoded inside... everything has been done.
  565. YESSIR! there is absolutely no need to loose time on the WWW,
  566. "surfing" idiotically from a junk site to the next or waiting
  567. hours to download some slow file from an instable server! Wasting
  568. time of your own LIFE, that you could use to read poetry, to make
  569. love, to look at the stars, to sail slowly between the Aegean
  570. islands or to start a nice cracking session. What's the point of
  571. wasting your time when machines can perform all the searches you
  572. need better, more productively and faster than you ever could...
  573. YESSIR! You can get *everything* on the Web, and without paying
  574. your Internet provider more than a couple of dimes... Nice, isn't
  575. it?
  576.  
  577. By now, if you have followed all my lessons, you should be able
  578. to crack relatively quickly "normal" applications. There are some
  579. new projects for 1997: a cracking "university", that will allow
  580. us to prepare for the divine war against Microsoft repulsive
  581. dominion. If you do not have already chosen your handle (your
  582. "cracker" name, that's it), you may consider choosing an handle
  583. with a "+" somewhere inside it or, eventually, add a "+" to your
  584. handle. This sign is used by me and by friends that have studied
  585. and/or contributed. But a "+" in your handle ("official +ORC
  586. cracker") will mean even more:
  587. 1)   allows support from me personally (on a "do ut des" basis)
  588. 2)   allows pupils to identify each other (good for joining
  589.      forces)
  590. 3)   will open you (eventually) the doors to the "higher"
  591.      cracking university I'll set up on the Web in 1997.
  592. (I'm not getting megalomaniac... In reality I only need a "quick"
  593. method to know on which (anonymous) people I can count on for the
  594. next phase).
  595.  
  596. Well, that's it for this lesson, reader. Not all lessons of my
  597. tutorial are on the Web.
  598.      You 'll obtain the missing lessons IF AND ONLY IF you mail
  599. me back (via anon.penet.fi) with some tricks of the trade I may
  600. not know that YOU discovered. Mostly I'll actually know them
  601. already, but if they are really new you'll be given full credit,
  602. and even if they are not, should I judge that you "rediscovered"
  603. them with your work, or that you actually did good work on them,
  604. I'll send you the remaining lessons nevertheless. Your
  605. suggestions and critics on the whole crap I wrote are also
  606. welcomed.
  607.  
  608. +ORC an526164@anon.penet.fi
  609.